package org.example.config;

import org.springframework.context.annotation.Configuration;

/**
 * <p>
 * .
 *
 * @author o_o
 * @date 2025-08-27
 */
@Configuration
public class ESConfig {


//    @Bean
//    public RestHighLevelClient client () {
//        RestClientBuilder build = RestClient.builder(new HttpHost("192.168.101.104",9200,"http"));
//        CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
//        credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials("elastic", "123456")); //用户名和密码
//        build.setHttpClientConfigCallback((HttpAsyncClientBuilder httpAsyncClientBuilder) -> httpAsyncClientBuilder.setDefaultCredentialsProvider(credentialsProvider));
//        return new RestHighLevelClient(build);
//
//    }


}
